import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/index'
import Login from '@/components/login'
import CompanyVote from '@/components/companyVote'
import IntroduceCom from '@/components/introduceCom'
import AnalystVote from '@/components/analystVote'
import AnalystInfo from '@/components/analystInfo'
import ActivitiesDetail from '@/components/activitiesDetail'
import ArticleDetail from '@/components/articleDetail'
import WinPrize from '@/components/winPrize'
import AnalystTypeList from '@/components/analystTypeList'
import CompanyTypeList from '@/components/companyTypeList'
import UserInfo from '@/components/userInfo'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
   {
      path: '/',
      name: 'Index',
      component: Index
   },
   {
      path: '/Login',
      name: 'Login',
      component: Login
   },
   {
      path: '/UserInfo',
      name: 'UserInfo',
      component: UserInfo
   },
   {
      path: '/AnalystTypeList',
      name: 'AnalystTypeList',
      component: AnalystTypeList
   },
   {
      path: '/CompanyTypeList',
      name: 'CompanyTypeList',
      component: CompanyTypeList
   },
   {
      path: '/CompanyVote',
      name: 'CompanyVote',
      component: CompanyVote
   },
   {
      path: '/IntroduceCom/:id',
      name: 'IntroduceCom',
      component: IntroduceCom
   },
   {
      path: '/ArticleDetail/:id',
      name: 'ArticleDetail',
      component: ArticleDetail
   },
   {
      path: '/AnalystVotes/',
      name: 'AnalystVotes',
      component: AnalystVote,
      children: [
        {
          path:'/AnalystVotes/:type',
          name: 'AnalystVote',
          component: AnalystVote,
        }
      ]
   },
   {
      path: '/AnalystInfo/:id',
      name: 'AnalystInfo',
      component: AnalystInfo
   },
   {
      path: '/ActivitiesDetail',
      name: 'ActivitiesDetail',
      component: ActivitiesDetail
   },
   {
      path: '/WinPrize',
      name: 'WinPrize',
      component: WinPrize
   }
  ]
})